from time import sleep

from selenium import webdriver

ff_driver = 'D:/A00__Dev/SeBrowserDriver/geckodriver.exe'
ff_exe = 'C:/Program Files/Mozilla Firefox/firefox.exe'
# 解决火狐实例化失败：明确指明相关文件位置
driver = webdriver.Firefox(firefox_binary=ff_exe, executable_path=ff_driver)
driver.get('http://localhost/myweb/jxc/index.asp')

# 输入登录名
driver.find_element_by_name('username').send_keys('admin')
# 输入密码
driver.find_element_by_name('pwd').send_keys('admin')
# 点击登录按钮
driver.find_element_by_name('enter').click()

sleep(3)
driver.quit()
